Skip to content

[python] Support VARIANT type in pypaimon#7635

Merged
JingsongLi merged 9 commits intoapache:masterfrom
chenghuichen:python-variant
Apr 29, 2026
Merged

[python] Support VARIANT type in pypaimon#7635
JingsongLi merged 9 commits intoapache:masterfrom
chenghuichen:python-variant

Conversation

@chenghuichen
Copy link
Copy Markdown
Contributor

@chenghuichen chenghuichen commented Apr 13, 2026

Purpose

Background: #7655

This PR adds VARIANT read/write support to pypaimon, with a particular focus on shredded VARIANT.

  • Write: when variant.shreddingSchema is configured on a table, VARIANT columns are written in shredded Parquet format according to the schema.
  • Read: shredded VARIANT columns are automatically reassembled back into standard struct<value: binary, metadata: binary> form, transparent to the caller.

Shredded column pruning and predicate pushdown will be built on top of this PR.

Tests

  • Unit tests
    • pypaimon/tests/variant_test.py
  • E2E tests
    • run_java_variant_write_py_read_test
    • run_py_variant_write_java_read_test

@chenghuichen chenghuichen changed the title [python] Support VARIANT type in pypaimon [WIP][python] Support VARIANT type in pypaimon Apr 14, 2026
@chenghuichen chenghuichen changed the title [WIP][python] Support VARIANT type in pypaimon [python] Support VARIANT type in pypaimon Apr 15, 2026
@chenghuichen
Copy link
Copy Markdown
Contributor Author

The PR is ready for review now.

@JingsongLi
Copy link
Copy Markdown
Contributor

Thanks @chenghuichen , let me check this.

Comment thread paimon-python/pypaimon/data/generic_variant.py Outdated
Comment thread paimon-python/pypaimon/data/variant_shredding.py
@chenghuichen
Copy link
Copy Markdown
Contributor Author

@JingsongLi Fixed. Thanks a lot!

Copy link
Copy Markdown
Contributor

@JingsongLi JingsongLi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@JingsongLi JingsongLi merged commit 14745f4 into apache:master Apr 29, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants